Comparing same attribute in trigger

Hello everybody.

I'm starting with DOORS and DXL and eventually I read this forum when I have a doubt.

But, this time I needed to make a register and ask to you guys. Because i do not finded anything on the internet or in the dxl Help about this.

The trouble is:

I need to create a trigger that make a comparison between his saved state and the new state and i do not have a clue how to make it.

Example:

I have a attribute caled "Level", this attribute is an enumeration, the Level saved state is 5, and the user tryed to change it to 1

So, i need to compare the 5 with 1.

I tryed to use the "post" and "pre" property when i installed a trigger to try to fix that, but no success.

Some one has a sugestion or an idead to how can i make it work?

Thank you!


Jstein - Mon Apr 10 14:17:03 EDT 2017

Re: Comparing same attribute in trigger
Mathias Mamsch - Tue Apr 11 04:45:32 EDT 2017

You can make a "pre change" trigger - in this case you can get the current value from the attribute itself, while you can get the new value from the trigger itself: 

string value (Trigger)
string attribute (Trigger)
void value (Trigger, Buffer data)

Then you can abort the change, by setting a trigger result trigPreConFail 

void set (TriggerStatus)

Does this help you? Regards, Mathias